package com.kaifamiao.date;

import java.util.Date;

/**
 * Date实例是可变的
 */
public class DateFeature {

    public static void main(String[] args) {

        final Date date = new Date();
        System.out.println( date );

        long millis = date.getTime();
        System.out.println( millis );

        date.setTime( 1000L * 60 * 60 * 24 * 365 * -30 );

        System.out.println( date );

        date.setTime( 1000L * 60 * 60 * 24 * 365 * 52 );

        System.out.println( date );

    }

}
